<%@ page import="sige.Usuario" %>

<div class="control-group">
    <label class="control-label" for="pessoa">
        <g:message code="usuario.pessoa.label" default="Pessoa" />
        <span class="required-indicator">*</span>
    </label>
    <div class="controls">
        <span class="input-xlarge uneditable-input">${usuarioInstance?.pessoa?.nome.encondeAsHTML()}</span>
    </div>
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'login', 'error')} ">
	<label for="login">
		<g:message code="usuario.login.label" default="Login" />
		
	</label>
	<g:textField name="login" value="${usuarioInstance?.login}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'senha', 'error')} ">
	<label for="senha">
		<g:message code="usuario.senha.label" default="Senha" />
		
	</label>
	<g:textField name="senha" value="${usuarioInstance?.senha}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'ultimoAcesso', 'error')} ">
	<label for="ultimoAcesso">
		<g:message code="usuario.ultimoAcesso.label" default="Ultimo Acesso" />
		
	</label>
	<g:datePicker name="ultimoAcesso" precision="day"  value="${usuarioInstance?.ultimoAcesso}" default="none" noSelection="['': '']" />
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'ativo', 'error')} ">
	<label for="ativo">
		<g:message code="usuario.ativo.label" default="Ativo" />
		
	</label>
	<g:checkBox name="ativo" value="${usuarioInstance?.ativo}" />
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'contaExpirada', 'error')} ">
	<label for="contaExpirada">
		<g:message code="usuario.contaExpirada.label" default="Conta Expirada" />
		
	</label>
	<g:checkBox name="contaExpirada" value="${usuarioInstance?.contaExpirada}" />
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'contaTrancada', 'error')} ">
	<label for="contaTrancada">
		<g:message code="usuario.contaTrancada.label" default="Conta Trancada" />
		
	</label>
	<g:checkBox name="contaTrancada" value="${usuarioInstance?.contaTrancada}" />
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'permissoes', 'error')} ">
	<label for="permissoes">
		<g:message code="usuario.permissoes.label" default="Permissoes" />
		
	</label>
	<g:select name="grupo" from="${sige.Grupo.list()}" optionKey="id" value="${usuarioInstance?.grupo?.id}" class="many-to-many"/>
</div>

